#pragma once

#include "planner/group_expression.h"
#include "planner/property_visitor.h"

namespace optimizer {

class PropertySet;

/**
 * PropertyEnforcer class is used for enforcing properties for
 * a specified GroupExpression.
 */
class PropertyEnforcer : public PropertyVisitor {
 public:
  GroupExpression *EnforceProperty(GroupExpression *gexpr, Property *property);

  void Visit(const PropertySort *prop) override;

 private:
  GroupExpression *input_gexpr_;

  GroupExpression *output_gexpr_;
};

}  // namespace optimizer
